package com.ymttest.database.sqlwapper;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtCoupon;
import com.ymttest.database.model.coupon;
import com.ymttest.database.model.couponbag;
import com.ymttest.database.model.couponbatch;
import com.ymttest.utils.EnvSetup;

public class couponbagWapper {
	SqlManager manager;

    public couponbagWapper() {
        manager = new SqlManager("mysqlcoupon" + EnvSetup.getEnv());
    }

    public couponbag selectByPrimaryKey(String bagCode) {
    	couponbag couponbag=new couponbag();
        List<couponbag> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.couponbagMapper.selectByPrimaryKey",
                        bagCode);
        manager.commit();
        if(result.size()>0)
        {
        	couponbag=result.get(0);
        }
        return couponbag;
    }

   

    public static void main(String[] args) {
//        YmtCouponWapper test = new YmtCouponWapper();
//
//        System.out.println(test.useCoupon(20238699, "AIL7PT3W1",null));
//        // test.insertYmtCouponSetting(3,11);
//        // Logger.debug(test.getLastYmtCouponSettingId());
    }
}
